package com.wish.wishfinancial_service.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wish.wishfinancial_service.entity.TCwPaymentPlan;
import com.wish.wishfinancial_service.mapper.TCwPaymentPlanMapper;
import com.wish.wishfinancial_service.service.ITCwPaymentPlanService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import dto.financialDto.TCwPaymentPlanDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/*
 * @author pengge
 * @since 2021-04-14
 */
@Service
public class TCwPaymentPlanServiceImpl extends ServiceImpl<TCwPaymentPlanMapper, TCwPaymentPlan> implements ITCwPaymentPlanService {
    @Autowired
    private TCwPaymentPlanMapper cwPaymentPlanMapper;

    @Override
    public PageInfo<TCwPaymentPlan> selects(TCwPaymentPlanDto tCwPaymentPlanDto) {
        PageHelper.startPage(tCwPaymentPlanDto.getPageNum(),tCwPaymentPlanDto.getPageSize());
        List<TCwPaymentPlan> list = cwPaymentPlanMapper.selects(tCwPaymentPlanDto);
        return new PageInfo<>(list);
    }
}
